package com.ziytek.web.citizen.model.rsp;

import com.ziytek.web.citizen.constant.ServerConstant;
import com.ziytek.web.citizen.model.bean.AllComprehensiveDetails;
import lombok.Data;

import java.util.List;

/**
 * @author fenghx
 * @version v1.0
 * @className QueryBatteriesDetailsResponse
 * @descripton 查询充放电电流电压详情数据
 * @date 2023/4/20 14:25
 **/

@Data
public class BatteryComprehensiveRsp {

    /**
     * 返回编码
     */
    private String retCode;

    /**
     * 编码描述
     */
    private String retMsg;

    /**
     * 充放电电压数据
     */
    private List<AllComprehensiveDetails> data;

    public void error() {
        this.retCode = ServerConstant.ERROR;
        this.retMsg = ServerConstant.ERROR_MSG;
    }

    public void error(String msg) {
        this.retCode = ServerConstant.ERROR;
        this.retMsg = msg;
    }

    public void success() {
        this.retCode = ServerConstant.SUCCESS;
        this.retMsg = ServerConstant.SUCCESS_MSG;
    }
}
